#ifndef USER_H_INCLUDED
#define USER_H_INCLUDED

//(* wxWidgets includes
#include <wx/window.h>
#include <wx/string.h>
//*)

//(* C/C++ includes
//*)

//(* other includes
#include "../common/stdafx.h"
#include "NewUserDlg.h"
#include "ErrorLog.h"
#include "Options.h"
#include "LogInDlg.h"
#include "MySql/MySqlEmbeddedWrapper.h"
//*)

//(* defines
//*)

//(* constants
//*)

wxString GenerateDBName();

class CUsers
{
public:
    CUsers(wxWindow* pParent, CMySqlWrapper* pMySql);
    ~CUsers();
    bool GetNewUserInfo(SUserInfo& UserInfo, bool& RememberMe, const bool First = false);
    bool CheckIfUserNameExists(wxString UserName);
    bool SaveUser(SUserInfo& UI, const bool IsNewUser, const bool IsFirstUser);
    bool LogInUser(const SUserInfo& UserInfo, const bool CheckUserID = true);
    const SUserInfo GetCurrentUser() const;
    void SetCurrentUser(const SUserInfo& UI);

private:
    wxWindow*                     m_pParent;
    CMySqlWrapper*                m_pMySql;
    SUserInfo                     m_CurrentUser;
};


#endif // USER_H_INCLUDED
